package com.ganlebao.study.springcloudfeignclient.basic.acl;

import feign.Response;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * name 必填.
 */
@FeignClient(name = "git-hub", url = "https://api.github.com", fallbackFactory = GitHubQueryFallbackServiceFactory.class)
public interface GitHubQueryService {

    @GetMapping("/search/repositories")
    String searchRepo(@RequestParam("q") String keyValue);

    @GetMapping("/search/repositories")
    ResponseEntity<byte[]> searchRepoUseGzip(@RequestParam("q") String keyValue);


    @GetMapping("/search/reposi")
    String notExistsPage(@RequestParam("q") String keyValue);
}
